import 'package:flutter/material.dart';
import '../../model/conversation.dart';

class UiChatdetailBar extends StatefulWidget {
  UiChatdetailBar({Key? key, required this.data}) : super(key: key);

  Conversation data;

  @override
  _UiChatdetailBarState createState() => _UiChatdetailBarState();
}

class _UiChatdetailBarState extends State<UiChatdetailBar> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(right: 16),
      child: Row(
        children: <Widget>[
          SizedBox(
            width: 2,
          ),
          CircleAvatar(
            backgroundImage:
                NetworkImage("https://randomuser.me/api/portraits/men/5.jpg"),
            maxRadius: 20,
          ),
          SizedBox(
            width: 12,
          ),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(
                  this.widget.data.title,
                  style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
                ),
                SizedBox(
                  height: 6,
                ),
                Text(
                  "Online",
                  style: TextStyle(color: Colors.grey.shade600, fontSize: 13),
                ),
              ],
            ),
          ),
          Icon(
            Icons.settings,
            color: Colors.black54,
          ),
        ],
      ),
    );
  }
}
